//
//  MainCell.m
//  LvXingPai
//
//  Created by mafang on 16/8/10.
//  Copyright © 2016年 _Junxee. All rights reserved.
//

#import "MainCell.h"

@interface MainCell ()

/**
 *  主题图片
 */
@property (weak, nonatomic) IBOutlet UIImageView *coverImage;

/**
 *  标题
 */
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;

/**
 *  店名
 */
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;

/**
 *  市场价格
 */
@property (weak, nonatomic) IBOutlet UILabel *marketPriceLabel;

/**
 *  现在价格
 */
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;

/**
 *  区域名称
 */
@property (weak, nonatomic) IBOutlet UILabel *zhNameLabel;
@end

@implementation MainCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSaleModel:(SaleModel *)saleModel
{
    _saleModel = saleModel;
    [self.coverImage sd_setImageWithURL:[NSURL URLWithString:saleModel.coverurl] placeholderImage:[UIImage imageNamed:@"master_placeholder_bg"]];
    self.titleLabel.text = saleModel.title;
    self.nameLabel.text = saleModel.name;
    self.marketPriceLabel.text = [NSString stringWithFormat:@"¥%@",saleModel.marketPrice];
    self.priceLabel.text = [NSString stringWithFormat:@"¥%@",saleModel.price];
    self.zhNameLabel.text = saleModel.zhName;
}

@end
